<template>
  <div class="navigation_bar_container">
    <div class="navigation_bar_wrapper">
      <div class="navigation_bar_item" v-for="(item,index) in imgArry" :key="index" @click="change(item)"> 
        <div class="navigation_bar_item_img">
          <img :src="item.img" alt="">
        </div>
        <div class="navigation_bar_item_title">
          {{item.title}}
        </div>
      </div>
    </div>
  </div>
</template>

<script>
import PATH_GO from "../../router/constant"
export default {
  props:{
    imgArry:{
      type:Array,
      required:true
    }
  },
  methods:{
    change(item){
      var PATH = item.title;
      console.log(PATH)
      switch (PATH) {
        case "签到":
          this.$router.goNext(PATH_GO.SIGN)
          break;
        case "礼券":
          this.$router.goNext(PATH_GO.GIFT)
          break;
        case "砍价":
          this.$router.goNext(PATH_GO.BARGAINING)
          break;
        case "专栏":
          this.$router.goNext(PATH_GO.SPECIAL)
          break;
        default:
          break;
      }
    }
  }
}
</script>

<style scoped>
.navigation_bar_container
{
    width: 100%;
    height: 110px;
    border-bottom: 15px solid #efefef;
    background-color: #fff;
    position: absolute;
    top: 280px;
    border-radius:30% 30% 0 0; 
    left: 0;
    display: inline-flex;
    justify-content: space-between;
    padding: 0 20px;
    box-sizing: border-box;
    align-items: center;
}

.navigation_bar_wrapper
{
  width: 100%;
  height: 80%;
  display: inline-flex;
  justify-content: space-between;
}

.navigation_bar_item
{
  /* border: 1px solid #eee; */
  flex: 1;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
}

.navigation_bar_item_img
{
  width: 100%;
  height: 60%;
  display: inline-flex;
  justify-content: center;
  /* flex-direction: column; */
  align-items: center;
}

.navigation_bar_item_title
{
  text-align: center;
}

.navigation_bar_item_img img
{
  width: 50%;
  height: auto;
}

</style>